﻿
/*----------------------------------------------------------------
    Copyright (C) 2017 CXC

    文件名：IACRequest.cs
    文件功能描述：客户端请求接口


    创建标识：CXC @ 20170612

----------------------------------------------------------------*/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AcSDK.Core
{
    /// <summary>
    /// 客户端请求接口.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IAcRequest<out T> where T : AcResponseBase
    {
        /// <summary>
        /// 获取TOP的API名称.
        /// </summary>
        string GetApiName();

        /// <summary>
        /// 获取被调用的目标AppKey
        /// </summary>
        string GetTargetAppKey();

        /// <summary>
        /// 获取所有的Key-Value形式的文本请求参数字典.
        /// </summary>
        IDictionary<string, string> GetParameters();

        /// <summary>
        /// 获取自定义HTTP请求头参数.
        /// </summary>
        IDictionary<string, string> GetHeaderParameters();

        /// <summary>
        /// 客户端参数检查，减少服务端无效调用.
        /// </summary>
        void Validate();
    }
}
